package cate.common.table.pvp.crossboss;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "奖励分组")
public class CrossBossRwdGroupRow extends ERow implements RWItem {

    @NoteField("奖励")
    public String rwdStr;

    @NoteField("权重")
    public int weight;

    @NoteField("分组")
    public int group;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("奖励ID", 0);
        this.rwdStr = xrw.getString("奖励");
        this.weight = xrw.getInteger("权重", 0);
        this.group = xrw.getInteger("分组", 0);
    }

    @Override
    public double getWeight() {
        return weight;
    }
}
